<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>字典管理</title>
    <link rel="stylesheet" href="/static/assets/layui-v2.5.6/css/layui.css">
    <link rel="stylesheet" href="/static/css/custom/layui.css">
    <style>
        .data-table{
            display: inline-block;
        }
        .custom-input-block {
            width: 80%;
        }
    </style>
</head>
<body>
<div class="container">
    <#--数据表格-->
    <div class="data-table" style="width: 60%">
        <#--查询选项-->
        <form class="layui-form" id="queryForm">
            <div class="layui-form-item">
                <div>
                    <div class="layui-input-inline">
                        <input name="searchContent" type="text" class="layui-input" autocomplete="off"
                               placeholder="输入字典名称、编码">
                    </div>
                </div>
                <div>
                    <button class="layui-btn layui-btn-normal" id="btnSearch" type="button">
                        <i class="layui-icon layui-icon-search"></i>搜索
                    </button>
                    <button class="layui-btn layui-btn-primary v-top" id="btnReset" type="button">
                        <i class="layui-icon layui-icon-fonts-clear"></i>清空
                    </button>
                    <button class="layui-btn layui-btn-normal" type="button" id="btnAdd">
                        <i class="layui-icon layui-icon-add-1"></i>新增
                    </button>
                    <button class="layui-btn layui-btn" type="button" id="btnUpdate">
                        <i class="layui-icon layui-icon-edit"></i>修改
                    </button>
                    <button class="layui-btn layui-btn-danger" type="button" id="btnDelete">
                        <i class="layui-icon layui-icon-delete"></i>删除
                    </button>
                </div>
            </div>
        </form>
        <table class="layui-hide" id="datagrid" lay-filter="datagrid"
               lay-data="{id: &#39;datagrid&#39;}" lay-size="sm"></table>
    </div>

    <#--数据表格（字典条目）-->
    <div class="data-table" style="width: 38%;">
        <div>
            <button class="layui-btn layui-btn-normal" type="button" id="btnAddItem">
                <i class="layui-icon layui-icon-add-1"></i>新增
            </button>
            <button class="layui-btn layui-btn" type="button" id="btnUpdateItem">
                <i class="layui-icon layui-icon-edit"></i>修改
            </button>
            <button class="layui-btn layui-btn-danger" type="button" id="btnDeleteItem">
                <i class="layui-icon layui-icon-delete"></i>删除
            </button>
        </div>
        <table class="layui-hide" id="datagridItem" lay-filter="datagridItem"
               lay-data="{id: &#39;datagrid&#39;}" lay-size="sm"></table>
    </div>

    <#--编辑表单-->
    <div id="dataModel" class="data-model">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="dictName" lay-verify="required" autocomplete="off"
                               placeholder="请输入字典名称"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">编码</label>
                    <div class="layui-input-inline">
                        <input type="text" name="dictCode" lay-verify="required" autocomplete="off"
                               placeholder="请输入字典编码"
                               class="layui-input">
                    </div>
                </div>


            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">类型</label>
                    <div class="layui-input-inline">
                        <input type="number" name="dictType" lay-verify="required" autocomplete="off"
                               class="layui-input" placeholder="请输入字典类型">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">父级id</label>
                    <div class="layui-input-inline">
                        <input type="number" name="dictPid" lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                    <input type="text" name="dictRemark" placeholder="" autocomplete="off"
                           class="layui-input custom-input-block">
                </div>
            </div>
            <div class="layui-form-item btn-opt">
                <div class="layui-input-block">
                    <button type="submit" id="formSubmitBtn" class="layui-btn" lay-submit="form_submit_btn"
                            lay-filter="form_submit_btn">确定
                    </button>
                </div>
            </div>
        </form>
    </div>


    <#--编辑表单(字典条目)-->
    <div id="dataModelItem" class="data-model">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="itemName" lay-verify="required" autocomplete="off"
                               placeholder="请输入字典条目名称"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">编码</label>
                    <div class="layui-input-inline">
                        <input type="number" name="itemValue" lay-verify="required" autocomplete="off"
                               placeholder="请输入字典条目编码"
                               class="layui-input">
                    </div>
                </div>


            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">所属字典</label>
                    <div class="layui-input-inline">
                        <select id="dictId" name="dictId">
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">排序</label>
                    <div class="layui-input-inline">
                        <input type="number" name="itemSort" lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                    <input type="text" name="itemRemark" placeholder="" autocomplete="off"
                           class="layui-input custom-input-block">
                </div>
            </div>
            <div class="layui-form-item btn-opt">
                <div class="layui-input-block">
                    <button type="submit" id="formSubmitBtnItem" class="layui-btn" lay-submit="form_submit_btn_item"
                            lay-filter="form_submit_btn_item">确定
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript" src="/static/assets/jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="/static/assets/layui-v2.5.6/layui.js"></script>
<script type="text/javascript" src="/static/js/page.js"></script>
<script type="text/javascript" src="/static/js/base_system/dict.js"></script>
<script type="text/javascript" src="/static/js/base_system/dict_item.js"></script>
</body>
</html>